/* 
 * Created on Feb 18, 2004
 *
 * Author: Sandeep Prakash
 * Project: Sucxentv2 (using leaf nodes only)
 */
package dbsucxentW.storageEdgeW.entitiesW;

import dbsucxentW.storageEdgeW.loadersW.Store;
//klarinda 20060901 DocumentSummary not used in Edge
//import dbsucxent.storageEdge.parser.DocumentSummary;
 
/**
 * @author Administrator
 *
 * 
 */
public abstract class LeafNodeCollection {
	
	
	//
	//XML file that has been parsed.
	//
	protected String _fileName;
	
	//
	//Document Summary.
	//klarinda 20060901 DocumentSummary not used in Edge 
	//protected DocumentSummary _summary;
	
	//
	//Path Collection
	private PathCollection _paths;
	
	//
	//Indicate if file has been processed completely.
	//
	protected boolean _isComplete = true;
	
	public abstract void add( LeafNode node );
	
	//
	//ResultSet like interface
	//Makes it easy to implement the multi-threaded version
	//next() can be made blocking...
	
	public abstract boolean next();
	
	public abstract LeafNode get();
	
	public abstract LeafNode get( int index );
	
	/*klarinda 20060901 DocumentSummary not used in Edge
	public DocumentSummary getSummary(){
		return _summary;
	}
	
	public void setSummary( DocumentSummary summary ){
		_summary = summary;
	}
	*/
	/**
	 * @return
	 */
	public String getFileName() {
		return _fileName;
	}

	/**
	 * @param fileName
	 */
	public void setFileName(String fileName) {
		_fileName= fileName;
	}
	
	public void completeProcessing(){
		_isComplete = true;
	}
	
	public int getPathId(String path, Store _store) {
	 
		return _paths.getPathId( path , _store);
	}
	
	
	public void setPathCollection( PathCollection paths ){
		_paths = paths;
	}
	
	public PathCollection getPathCollection(){
		return _paths;
	}
	
	public abstract void clear();

}
